@import "src/styles/constants";

.navbar {
  position: fixed;
  width: $navbarWidth;
  height: calc(100% - #{$headerHeight} - 20px);
  overflow-y: auto;
  overflow-x: hidden;
  background: $primary;
  padding: 20px;

  .search {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: $secondary;
    box-sizing: border-box;
    margin-bottom: 10px;
    width: 100%;
    transition: width 0.3s;

    &:focus-within {
      width: 100%;
    }

    img {
      display: inline;
      height: 16px;
      // filter: invert(1); // turn to white
    }

    input {
      background: transparent;
      color: $dark10;
      flex: 1;
      display: inline-block;
      margin-left: 10px;
      height: 100%;
      outline: 0;
      border: 0;
      font-size: $text20;

      &::placeholder {
        color: $dark30;
      }
    }
  }

  ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
  }

  li {
    position: relative;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;

    .public {
      background-color: $red30;
      color: $white;
      display: inline-block;
      padding: 2px 4px;
      margin-left: 4px;
      border-radius: 4px;
      vertical-align: top;
      z-index: 1;
      font-size: 11px;
      font-weight: 700;
    }

    &:hover {
      background: $blue50;
    }

    a {
      color: $white;
      font-size: $text40;
      padding: 12px 18px;
      width: 100%;
      display: inline-block;
      text-decoration: none;
      margin-bottom: 2px;
    }
    a:visited {
      color: $white;
    }
    a:active {
      color: $white;
    }
  }
}
